package com.teamfractal.fracdustry.common.item;

import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;

public class FDConsumableItem extends Item {

    public FDConsumableItem(Properties properties) {
        super(properties);
    }

    @Override
    public boolean hasCraftingRemainingItem() {
        return true;
    }

    @Override
    public ItemStack getContainerItem(ItemStack itemstack) {
        ItemStack stack = new ItemStack(this);
        stack.setDamageValue(itemstack.getDamageValue() + 1);
        if (stack.getDamageValue() >= stack.getMaxDamage()) {
            return ItemStack.EMPTY;
        }
        return stack;
    }
}
